Received: from relay.surfnet.nl (relay.surfnet.nl [192.87.36.2]) by kantti.helsinki.fi (8.6.9/8.6.5) with SMTP id RAA04137 for <blitz-list@helsinki.fi>; Sun, 17 Jul 1994 17:33:36 +0300
Received: from aixserv.hsbos.nl by relay.surfnet.nl with SMTP (PP)
id <24575-0@relay.surfnet.nl>; Sun, 17 Jul 1994 16:33:31 +0200
Received: from ms1.hsbos.nl by aixserv.hsbos.nl (AIX 3.2/UCB 5.64/4.03)
id AA37996; Sun, 17 Jul 1994 16:30:03 +0200
Received: from MS1/MAILQUEUE by ms1.hsbos.nl (Mercury 1.12);
Sun, 17 Jul 94 16:32:38 GMT-1DFT
Received: from MAILQUEUE by MS1 (Mercury 1.12); Sun, 17 Jul 94 16:32:14 GMT-1DFT
From: "j.valks" <j.valks@hsbos.nl>
To: blitz-list@helsinki.fi
Date: Sun, 17 Jul 1994 16:23:06
Subject: Sending
Priority: normal
X-Mailer: PMail v3.0 (R1a)
Message-Id: <1E265C87BBD@ms1.hsbos.nl>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Status:
Status: RO
Hi all,
I'll need your help. I'm writing a program what reads binary(!) data
from the serial port. This data is send by a PC and can be a program
, IFF pictures, etc. The size of the data is everytime 80 chars.
What I need is a good way to handle this data. How do I write the
data to a file ??? I tried this simpele program to test:
If OpenFile(0,"hd0:dm2")
If OpenFile(1,"ram:test")
MaxLen buf$=80
l.l=Lof(0)
whole.l=l/80
rest.l=l MOD 80
MaxLen rest$=rest
For tel.l=1 To whole
FileInput 0
buf$=Edit$(80)
FileOutput 1
Print buf$;
Next tel
FileInput 0
rest$=Edit$(rest)
FileOutput 1
Print rest$;
CloseFile 1
CloseFile 0
EndIf
EndIf
DefaultOutput
NPrint "Done..."
MouseWait:End
But it doesn't work! the final size is smaller! I think it has
something to do with the 'strange' ascii characters in the file.
I made the program on the PC side in Visual Basic and it has a
good file handling because you can choose between several file modes
in one command. If you use the binary mode, you have to define a
string variabel as a buffer.
But how do I do this in Blitz!
PLEASE HELP, MAYBE SOMEBODY FROM ACID ???????????????????????